package com.example.listossimage.设计模式.工厂方法模式;

import com.example.listossimage.设计模式.po.Pizza;

public class LDOrderPizza extends OrderPizza{

    Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if (orderType.equals("cheese")) {
            pizza = new LDCheesePizza();
        } else if (orderType.equals("papper")) {
            pizza = new LDPepperPizza();
        }
        return pizza;
    }
}

class NYOrderPizza extends OrderPizza {

    @Override
    Pizza createPizza(String orderType) {
        return null;
    }
}
